package com.yunji.base.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunji.common.annotation.Excel;
import com.yunji.common.base.PageDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * @Description: 代理商加盟DTO$
 * @Author: HuaAo
 * @Date: 2024-04-02$
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class AllianceDTO extends PageDTO {
    //
    @Excel(name = "id", width = 15)
    private String id;
    //姓名
    @Excel(name = "加盟商姓名", width = 15)
    @ApiModelProperty("加盟商姓名")
    @Length(message = "加盟商姓名不能超过{}个字符", max = 6)
    private String name;
    //手机号
    @Excel(name = "加盟商手机号", width = 15)
    @ApiModelProperty("加盟商手机号")
    @Length(message = "加盟商手机号不能超过{}个字符", max = 11)
    private String phone;
    //省
    @Excel(name = "省", width = 15)
    @ApiModelProperty("省")
    private String province;
    //市
    @Excel(name = "市", width = 15)
    @ApiModelProperty("市")
    private String city;
    //区
    @Excel(name = "区", width = 15)
    @ApiModelProperty("区")
    private String area;
    //详细地址
    @Excel(name = "详细地址", width = 15)
    @ApiModelProperty("详细地址")
    private String address;
    //售卖品类
    @Excel(name = "售卖品类", width = 15)
    @ApiModelProperty("售卖品类")
    private String sellType;
    //状态 0-待审核 1-已入住 2-已驳回
    @Excel(name = "状态 0-待审核 1-已入驻 2-已驳回", width = 15)
    @ApiModelProperty("状态 0-待审核 1-已入驻 2-已驳回")
    private String status;
    //用户昵称
    @Excel(name = "用户昵称", width = 15)
    @ApiModelProperty("用户昵称")
    private String userName;
    //用户手机号
    @Excel(name = "用户手机号", width = 15)
    @ApiModelProperty("用户手机号")
    private String userPhone;
    //加盟状态
    @Excel(name = "加盟状态 状态 0-待审核 1-已入驻 2-已驳回", width = 15)
    @ApiModelProperty("加盟状态")
    private Integer allianceStatus;
    //审核人
    @Excel(name = "审核人", width = 15)
    @ApiModelProperty("审核人")
    private String checkName;
    //审核时间
    @Excel(name = "审核时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkTime;
    @Excel(name = "备注", width = 15)
    @ApiModelProperty("备注")
    private String remark;
    /**
     * 入驻开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 入驻结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 审核开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkStartTime;
    /**
     * 审核结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkEndTime;
    /**
     * 申请开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyStartTime;
    /**
     * 申请结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyEndTime;
    /**
     * 入驻时间
     */
    @Excel(name = "入驻时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("入驻时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date enterTime;
    /**
     * 申请时间
     */
    @Excel(name = "申请时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    @ApiModelProperty("搜索字段")
    private String searchFiled;

    public String getStatus() {
        return getAllianceStatus() != null ? getAllianceStatus().toString() : "";
    }
}
